package com.group.elmboot.po;

import com.group.elmboot.bo.CreditTransactionBO;
import lombok.Getter;

import java.time.LocalDateTime;

@Getter
public class CreditTransaction extends CreditTransactionBO {

    private int id;
    private LocalDateTime createTime;

    public CreditTransaction(CreditTransactionBO creditTransactionBO){
        this.userId=creditTransactionBO.getUserId();
        this.channelId=creditTransactionBO.getChannelId();
        this.eventId=creditTransactionBO.getEventId();
        this.credit=creditTransactionBO.getCredit();
        this.expiredTime=creditTransactionBO.getExpiredTime();
    }

    public CreditTransaction(int id,LocalDateTime createTime,int credit,LocalDateTime expiredTime,String userId,int channelId,int eventId){
        this.userId=userId;
        this.channelId=channelId;
        this.eventId=eventId;
        this.credit=credit;
        this.expiredTime=expiredTime;
        this.createTime=createTime;
        this.id=id;
    }

}
